//
//  UIButton+XYAdd.h
//  PeiJue
//
//  Created by lxy on 2017/9/28.
//  Copyright © 2017年 lixiya. All rights reserved.
//

#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIButton (XYAdd)
#pragma mark - 普通方法创建
/**
 *  快捷创建一个UIButton
 */
+ (UIButton *)buttonWithTitle:(nullable NSString *)title titleColor:(nullable UIColor *)titleColor font:(nullable UIFont *)font imageName:(nullable NSString *)imageName backImageName:(nullable NSString *)backImageName target:(id)target action:(SEL)action;

/**
 *  快捷创建一个UIButton 标题、标题颜色、字体大小
 */
+ (UIButton *)buttonWithTitle:(nullable NSString *)title titleColor:(nullable UIColor *)titleColor font:(nullable UIFont *)font target:(id)target action:(SEL)action;

#pragma mark - block回调创建
/**
 *  快捷创建一个UIButton
 *  block回调
 */
+ (UIButton *)buttonWithTitle:(nullable NSString *)title titleColor:(nullable UIColor *)titleColor font:(nullable UIFont *)font imageName:(nullable NSString *)imageName backImageName:(nullable NSString *)backImageName block:(void(^)(UIButton *button))block;

/**
 *  快捷创建一个UIButton 标题、标题颜色、字体大小
 *  block回调
 */
+ (UIButton *)buttonWithTitle:(nullable NSString *)title titleColor:(nullable UIColor *)titleColor font:(nullable UIFont *)font block:(void(^)(UIButton *button))block;

@end
NS_ASSUME_NONNULL_END
